<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: GFC</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group__CO__GFC.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">GFC<div class="ingroups"><a class="el" href="group__CO__CANopen__304.html">CANopen_304</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__GFC_8c"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__GFC_8c.html">CO_GFC.c</a></td></tr>
<tr class="memdesc:CO__GFC_8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Global fail-safe command protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:CO__GFC_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__GFC_8h.html">CO_GFC.h</a></td></tr>
<tr class="memdesc:CO__GFC_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopen Global fail-safe command protocol. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__GFC__t.html">CO_GFC_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">GFC object.  <a href="structCO__GFC__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga23d83d03ef1b9ad5ffe68103a627026c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__GFC.html#ga23d83d03ef1b9ad5ffe68103a627026c">CO_GFC_init</a> (<a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *GFC, <a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *valid, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *GFC_CANdevRx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> GFC_rxIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidRxGFC, <a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *GFC_CANdevTx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> GFC_txIdx, <a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a> CANidTxGFC)</td></tr>
<tr class="memdesc:ga23d83d03ef1b9ad5ffe68103a627026c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize GFC object.  <a href="group__CO__GFC.html#ga23d83d03ef1b9ad5ffe68103a627026c">More...</a><br /></td></tr>
<tr class="separator:ga23d83d03ef1b9ad5ffe68103a627026c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa7cf845381bf150a5816bc068ab9218f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__GFC.html#gaa7cf845381bf150a5816bc068ab9218f">CO_GFC_initCallbackEnterSafeState</a> (<a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *GFC, void *object, void(*pFunctSignalSafe)(void *object))</td></tr>
<tr class="memdesc:gaa7cf845381bf150a5816bc068ab9218f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize GFC callback function.  <a href="group__CO__GFC.html#gaa7cf845381bf150a5816bc068ab9218f">More...</a><br /></td></tr>
<tr class="separator:gaa7cf845381bf150a5816bc068ab9218f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga64a30ac6c275d166a2f4117050b12c8c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__GFC.html#ga64a30ac6c275d166a2f4117050b12c8c">CO_GFCsend</a> (<a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *GFC)</td></tr>
<tr class="memdesc:ga64a30ac6c275d166a2f4117050b12c8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send GFC message.  <a href="group__CO__GFC.html#ga64a30ac6c275d166a2f4117050b12c8c">More...</a><br /></td></tr>
<tr class="separator:ga64a30ac6c275d166a2f4117050b12c8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Global fail-safe command protocol.</p>
<p>Very simple consumer/producer protocol. A net can have multiple GFC producer and multiple GFC consumer. On a safety-relevant the producer can send a GFC message (ID 0, DLC 0). The consumer can use this message to start the transition to a safe state. The GFC is optional for the security protocol and is not monitored (timed). </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga23d83d03ef1b9ad5ffe68103a627026c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga23d83d03ef1b9ad5ffe68103a627026c">&#9670;&nbsp;</a></span>CO_GFC_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_GFC_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *&#160;</td>
          <td class="paramname"><em>GFC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#gaba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *&#160;</td>
          <td class="paramname"><em>valid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>GFC_CANdevRx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>GFC_rxIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidRxGFC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structCO__CANmodule__t.html">CO_CANmodule_t</a> *&#160;</td>
          <td class="paramname"><em>GFC_CANdevTx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>GFC_txIdx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CO__dataTypes.html#ga1f1825b69244eb3ad2c7165ddc99c956">uint16_t</a>&#160;</td>
          <td class="paramname"><em>CANidTxGFC</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize GFC object. </p>
<p>Function must be called in the communication reset section.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">GFC</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">valid</td><td>pointer to the valid flag in OD (0x1300) </td></tr>
    <tr><td class="paramname">GFC_CANdevRx</td><td>CAN device used for SRDO reception. </td></tr>
    <tr><td class="paramname">GFC_rxIdx</td><td>Index of receive buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANidRxGFC</td><td>GFC CAN ID for reception </td></tr>
    <tr><td class="paramname">GFC_CANdevTx</td><td>AN device used for SRDO transmission. </td></tr>
    <tr><td class="paramname">GFC_txIdx</td><td>Index of transmit buffer in the above CAN device. </td></tr>
    <tr><td class="paramname">CANidTxGFC</td><td>GFC CAN ID for transmission</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532" title="Return values of some CANopen functions.">CO_ReturnError_t</a>: CO_ERROR_NO or CO_ERROR_ILLEGAL_ARGUMENT. </dd></dl>

</div>
</div>
<a id="gaa7cf845381bf150a5816bc068ab9218f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa7cf845381bf150a5816bc068ab9218f">&#9670;&nbsp;</a></span>CO_GFC_initCallbackEnterSafeState()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_GFC_initCallbackEnterSafeState </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *&#160;</td>
          <td class="paramname"><em>GFC</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void(*)(void *object)&#160;</td>
          <td class="paramname"><em>pFunctSignalSafe</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize GFC callback function. </p>
<p>Function initializes optional callback function, that is called when GFC is received. Callback is called from receive function (interrupt).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">GFC</td><td>This object. </td></tr>
    <tr><td class="paramname">object</td><td>Pointer to object, which will be passed to pFunctSignalSafe(). Can be NULL </td></tr>
    <tr><td class="paramname">pFunctSignalSafe</td><td>Pointer to the callback function. Not called if NULL. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga64a30ac6c275d166a2f4117050b12c8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga64a30ac6c275d166a2f4117050b12c8c">&#9670;&nbsp;</a></span>CO_GFCsend()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__driver.html#ga1cb2d3466eb0c6d267f3b5ff1a0d9532">CO_ReturnError_t</a> CO_GFCsend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__GFC__t.html">CO_GFC_t</a> *&#160;</td>
          <td class="paramname"><em>GFC</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send GFC message. </p>
<p>It should be called by application, for example after a safety-relevant change.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">GFC</td><td>GFC object.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Same as <a class="el" href="group__CO__driver.html#ga4664a9f5d547cb0605a9e929fb079f2e" title="Send CAN message.">CO_CANsend()</a>. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Thu Dec 24 2020 14:30:50 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
